-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove duplicate call to $(document).ready #42
Conversation
campbellgoe
commented
Apr 19, 2019
•
edited by PierreRambaud
edited by PierreRambaud
Questions | Answers |
---|---|
Branch? | develop |
Description? | This seemed to cause a bug for some users who could not reach the checkout page. This duplicate call would register the 'updateCart' event listener twice, therefore making 2 ajax post requests. |
Type? | bugfix |
BC breaks? | no |
Deprecations? | no |
Fixed ticket? | |
How to test? | Please check everything during the cart process works fine as we removed an unnecessary piece of code. |
Seems to make sense 👌 |
@PierreRambaud ping 😄 |
I think the problem come from elsewhere. $(document).ready(prepareTabs);
$(document).ready(prepareTables);
$(document).ready(prepareMenu); As you said, the problem is this callback is called twice |
The |
ohhh my bad, didn't see the nesting :D |
This seemed to cause a bug for some users who could not reach the checkout page. This duplicate call would register the 'updateCart' event listener twice, therefore making 2 ajax post requests.
PR rebased ✅ |
Thanks @gcdeveloper for the PR, it's good for me :) |
Thank you @gcdeveloper and @Robin-Fischer-PS |